package me.zhengjie.modules.system.domain;

import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import me.zhengjie.base.BaseEntity;
import org.hibernate.sql.Update;

import javax.persistence.*;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;

@Entity
@Getter
@Setter
@Table(name="jf_customer")
public class JfCustomer implements Serializable {

    @Id
    @Column(name = "id")
    @NotNull(groups = Update.class)
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @ApiModelProperty(value = "ID", hidden = true)
    private Long id;


    @NotBlank
    @Column(unique = true)
    @ApiModelProperty(value = "编码")
    private String code;

    @NotBlank
    @Column(unique = true)
    @ApiModelProperty(value = "名称")
    private String name;


    @NotBlank
    @Column(unique = true)
    @ApiModelProperty(value = "类别")
    private String type;

    @NotBlank
    @Column(unique = true)
    @ApiModelProperty(value = "是否停用")
    private boolean disable;
}
